#include <stdio.h>
#include <stdlib.h>

int main (int argc, char const* argv[])
{
    int a, b, c, d, t, ans, perc1, perc2;

    while (scanf("%d %d %d %d", &a, &b, &c, &d) && a != 0) {
        if (a < b) {
            t = a; a = b; b = t;
        }
        if (c < d) {
            t = c; c = d; d = t;
        }

        if (c >= a && d >= b) {
            ans = 100;
        } else {
            perc1 = (int)(c / (double)a * 100);
            perc2 = (int)(d / (double)b * 100);
            ans = perc1 < perc2 ? perc1 : perc2;
        }

        printf("%d%%\n", ans);
    }

    return 0;
}
